package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.SalaryPlanAddDTO;
import org.jsola.hr.dto.SalaryPlanBatchDTO;
import org.jsola.hr.dto.SalaryPlanUpdateDTO;
import org.jsola.hr.query.SalaryPlanQuery;
import org.jsola.hr.vo.SalaryPlanListVO;
import org.jsola.hr.vo.SalaryPlanVO;

import java.util.List;

/**
 * @author zhr
 */
@Api(tags = "hr-工资方案")
public interface ISalaryPlanControllerAPI {

    /**
     * 新增工资方案
     * @param salaryPlanAddDTO 工资方案新增实体
     * @return 工资方案展示对象
     */
    @ApiOperation(value = "新增工资方案")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryPlanAddDTO", dataType = "SalaryPlanAddDTO", value = "新增工资方案", paramType = "body")
    })
    Result<SalaryPlanVO> save(SalaryPlanAddDTO salaryPlanAddDTO);


    /**
     * 新增工资方案
     * @param salaryPlanAddDTO 工资方案新增实体
     * @return 工资方案展示对象
     */
    @ApiOperation(value = "新增工资方案")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryPlanAddDTO", dataType = "SalaryPlanAddDTO", value = "新增工资方案", paramType = "body")
    })
    Result<SalaryPlanVO> add(SalaryPlanAddDTO salaryPlanAddDTO);

    /**
     * 修改工资方案
     * @param salaryPlanUpdateDTO 工资方案
     * @return 更新数量
     */
    @ApiOperation(value = "修改工资方案")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryPlanUpdateDTO", dataType = "SalaryPlanUpdateDTO", value = "修改工资方案", paramType = "body")
    })
    Result<Integer> update(SalaryPlanUpdateDTO salaryPlanUpdateDTO);

    /**
     * 修改工资方案(业务需求)
     * @param salaryPlanUpdateDTO 工资方案
     * @return 更新数量
     */
    @ApiOperation(value = "修改工资方案")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryPlanUpdateDTO", dataType = "SalaryPlanUpdateDTO", value = "修改工资方案", paramType = "body")
    })
    Result<Integer> updateForBusiness(SalaryPlanUpdateDTO salaryPlanUpdateDTO);

    /**
     * 批量编辑、新增、删除工资方案
     * @param salaryPlanBatchDTO 要操作的工资方案
     * @return 操作之后的全部工资方案
     */
    @ApiOperation(value = "批量编辑、新增、删除工资方案")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryPlanBatchDTO", dataType = "SalaryPlanBatchDTO", value = "要操作的字段数据", paramType = "body")
    })
    Result batch(SalaryPlanBatchDTO salaryPlanBatchDTO);



    /**
     * 删除单个工资方案，彻底删除
     * @param salaryPlanId 工资方案id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个工资方案，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryPlanId", dataType = "String", value = "工资方案id", paramType = "path")
    })
    Result<Integer> delete(String salaryPlanId);


    /**
     * 批量删除工资方案，彻底删除
     * @param salaryPlanIds 工资方案id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除工资方案，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryPlanIds", dataType = "String[]", value = "工资方案id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] salaryPlanIds);


    /**
     * 根据工资方案id查询工资方案详情
     * @param salaryPlanId 工资方案id
     * @return 工资方案详情
     */
    @ApiOperation(value="根据工资方案id查询工资方案详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryPlanId", dataType = "String", value = "工资方案id", paramType = "path")
    })
    Result<SalaryPlanVO> findById(String salaryPlanId);


    /**
     * 查询工资方案
     * @param salaryPlanQuery 工资方案查询参数
     * @return page
     */
    @ApiOperation(value="查询工资方案")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryPlanQuery", dataType = "SalaryPlanQuery", value = "工资方案查询参数", paramType = "query")
    })
    Result<List<SalaryPlanListVO>> listAll(SalaryPlanQuery salaryPlanQuery);


     /**
     * 分页查询工资方案
     * @param salaryPlanQuery 工资方案查询参数
     * @return page
     */
    @ApiOperation(value="分页查询工资方案")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryPlanQuery", dataType = "SalaryPlanQuery", value = "工资方案查询参数", paramType = "query")
    })
    Result<Page<SalaryPlanListVO>> page(SalaryPlanQuery salaryPlanQuery);


}

